package com.bootdo.timing.dao;

import com.bootdo.timing.domain.OrderDO;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 
 * @author caisj
 * @email 1992lcg@163.com
 * @date 2020-01-05 22:43:00
 */
@Mapper
public interface OrderDao {

	OrderDO get(Integer id);
	
	List<OrderDO> list(Map<String, Object> map);
	
	int count(Map<String, Object> map);
	
	int save(OrderDO order);
	
	int update(OrderDO order);

	int updateByOrderId(OrderDO order);
	
	int remove(Integer id);
	
	int batchRemove(Integer[] ids);

	String getBuyAmount();

	@Select("select currencyType , sum(buyAmount) ,sum(buyNum) as buyAmount  as buyAmount from timing_order where state = 0  group by currencyType ")
    List<Map<String, Object>> getGroupPriceByType();
}
